package com.jane.adapter.categoryadapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by Jane on 2016/11/14.
 */

public class ZBInnerCategoryFragmentAdapter extends FragmentPagerAdapter{
    private ArrayList<Fragment> list;
    public ZBInnerCategoryFragmentAdapter(FragmentManager fm, ArrayList<Fragment> list) {
        super(fm);
        this.list=list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list==null?0:list.size();
    }
}
